﻿<%@ Page Language="C#" MasterPageFile="~/WebLicenseMain.Master" AutoEventWireup="true" CodeBehind="ManageAliases.aspx.cs" Inherits="WebLicenseGenerator.ManageAliases" Title="Sinacor Licenciamento - Cadastrar Aliases" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>
<%@ Register Src="UC/WaitingProcess.ascx" TagName="WaitingProcess" TagPrefix="UC" %>
<%@ Register Src="UC/SimpleTextBox.ascx" TagName="SimpleTextBox" TagPrefix="UC" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server" />
<asp:Content ID="Content2" ContentPlaceHolderID="pagePath" runat="server">Sinacor Licenciamento / Cadastrar Aliases</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="pageTitle" runat="server"><h1>CADASTRAR ALIASES</h1></asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="pageBody" runat="server">
	<asp:UpdatePanel ID="upPagePanel" runat="server">
		<ContentTemplate>
			<table width="100%">
				<tr valign="top">
					<td width="1">Novo&nbsp;Alias:</td>
					<td width="1"><UC:SimpleTextBox ID="txtNovoAlias" runat="server" Style="width: 50px" CssClass="textboxform" MaxLength="30" ErrorMessage="Por favor informe o nome desejado para o novo alias"/>&nbsp;</td>
					<td width="90%"><asp:Button ID="btInsertNewAlias" runat="server" Text="Inserir novo Alias" CssClass="button" OnClick="InsertNewAlias"/></td>
				</tr>
			</table>
			<table id="tbGridView" runat="server">
				<tr>
					<td>
						<fieldset class="tabela" style="width: 950px; height: 360px">
							<p>
								LISTA DE ALIASES CADASTRADOS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
								<div style="position: relative" enableviewstate="true">
									<asp:UpdateProgress ID="up1" runat="server" DisplayAfter="100">
										<ProgressTemplate>
											<UC:WaitingProcess ID="wp" runat="server" Left="50%" />
										</ProgressTemplate>
									</asp:UpdateProgress>
									<div style="height: 300px; overflow: auto;" id="divScroll" enableviewstate="true" runat="server">
										<asp:GridView ID="grdAlias" runat="server" Width="100%" AutoGenerateColumns="false">
											<Columns>
												<asp:BoundField DataField="ID" HeaderText="Id Alias" HeaderStyle-BackColor="#666666" HeaderStyle-ForeColor="White" HeaderStyle-BorderWidth="1px" HeaderStyle-BorderColor="#CCCCCC" ItemStyle-BackColor="White" ItemStyle-BorderWidth="1px" ItemStyle-BorderColor="#CCCCCC" ItemStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="Middle" />
												<asp:BoundField DataField="Nome" HeaderText="Nome Alias" HeaderStyle-BackColor="#666666" HeaderStyle-ForeColor="White" HeaderStyle-BorderWidth="1px" HeaderStyle-BorderColor="#CCCCCC" ItemStyle-BackColor="White" ItemStyle-BorderWidth="1px" ItemStyle-BorderColor="#CCCCCC" ItemStyle-HorizontalAlign="Left" ItemStyle-VerticalAlign="Middle" />
												<asp:TemplateField HeaderText="(*)" HeaderStyle-BackColor="#666666" HeaderStyle-ForeColor="White" HeaderStyle-BorderWidth="1px" HeaderStyle-BorderColor="#CCCCCC" ItemStyle-BackColor="White" ItemStyle-BorderWidth="1px" ItemStyle-BorderColor="#CCCCCC" ItemStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="Middle">
													<ItemTemplate>
														<asp:Button ID="btUpdateAlias" runat="server" CommandArgument='<%# Eval("ID") %>' CommandName="UpdateSelected" Text="UPD" CausesValidation="false"/>
													</ItemTemplate>
													<HeaderStyle BackColor="#666666" BorderColor="#CCCCCC" BorderWidth="1px" ForeColor="White" />
													<ItemStyle BackColor="White" BorderColor="#CCCCCC" BorderWidth="1px" />
												</asp:TemplateField>
												<asp:TemplateField HeaderText="(-)" HeaderStyle-BackColor="#666666" HeaderStyle-ForeColor="White" HeaderStyle-BorderWidth="1px" HeaderStyle-BorderColor="#CCCCCC" ItemStyle-BackColor="White" ItemStyle-BorderWidth="1px" ItemStyle-BorderColor="#CCCCCC" ItemStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="Middle">
													<ItemTemplate>
														<asp:Button ID="btDeleteAlias" runat="server" CommandArgument='<%# Eval("ID") %>' CommandName="DeleteSelected" Text="DEL" CausesValidation="false"/>
													</ItemTemplate>
													<HeaderStyle BackColor="#666666" BorderColor="#CCCCCC" BorderWidth="1px" ForeColor="White" />
													<ItemStyle BackColor="White" BorderColor="#CCCCCC" BorderWidth="1px" />
												</asp:TemplateField>
											</Columns>
										</asp:GridView>
									</div>
								</div>
							</p>
						</fieldset>
					</td>
				</tr>
			</table>
		</ContentTemplate>
	</asp:UpdatePanel>
</asp:Content>